<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<IList<Book>>" %>
<%@ Import Namespace="HTMLHelpers.Models"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Book List without helpers
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Book List without helpers</h2>

    <table>
    <tr>
        <td>Id</td>
        <td>Title</td>
        <td>&nbsp;</td>
    </tr>
    <% 
        int rowIndex = 0;
        foreach (var book in Model)
       {%>
        <% if (rowIndex++ % 2 == 0) { %>
        <tr style="background-color:Yellow">
        <% } else {%>
        <tr>
        <%}%>
           <td><%=book.Id %></td>
           <td><%=book.Title %></td>
           <td><%=Html.ActionLink("Details","Details",
                   new { id=book.Id}) %></td>
       </tr>
    <% } %>
    </table>

</asp:Content>
